/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package de.herberlin.pss;

import java.io.File;
import org.apache.log4j.Logger;
import org.jaudiotagger.audio.AudioFile;
import org.jaudiotagger.audio.AudioFileIO;

/**
 *
 * @author herberlin
 */
public class AudioFileManager {
    
    private AudioFile audioFile=null;
    private Logger logger=Logger.getLogger(getClass());

    public AudioFileManager(File source) {
        try {
            audioFile = AudioFileIO.read(source);
            logger.debug("AudioFile created for: " + source);
        } catch (Exception ex) {
            logger.error("Error creating AudioFile",ex);
            throw new AppException("Error creating AudioFile",ex);
        }
    }
    
    public AudioFile getAudioFile() {
        return audioFile;
    }
}
